package com.kgame5.xtank3d.model.tank.fsms.main {
import com.kgame5.xtank3d.GameEnum;
import com.kgame5.xtank3d.model.tank.fsms.TankState;
import com.kgame5.xtank3d.vo.MyTankVO;

/**
 * @author kk
 */
public class StateHurt  extends TankState{
	//__________________Propetty__________________
	
	//___________________Method___________________
	public function StateHurt(pvo:MyTankVO){
		super(GameEnum.STATE_HURT, pvo);
	}

	//进入状态
	override public function enter(info:Object=null):void{
		fsm.sendNotify(GameEnum.HURT_START,info);
		timer.start(tankVO.body.hurtDurMS);
	}

	//执行状态
	override public function update():void{
		if(timer.isOK()){
			fsm.SwitchState(GameEnum.STATE_GOOD);
		}
	}
	
	//退出状态
	override public function exit():void{
		fsm.sendNotify(GameEnum.HURT_END);
	}
}//end of class
}

